/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cognition.util.CORBA;

/**
 * Utility class used for CORBA libraries.
 * @author richard
 */
public class DataTypeUtil {

    public static org.omg.CORBA.StructMember[] clone(
            org.omg.CORBA.StructMember[] arr){

        if (arr == null || arr.length == 0)
            return new org.omg.CORBA.StructMember[0];
        org.omg.CORBA.StructMember[] result =
                new org.omg.CORBA.StructMember[arr.length];
                
        System.arraycopy(arr, 0, result, 0, arr.length);
        return result;
    }

    public static org.omg.CORBA.UnionMember[] clone(
            org.omg.CORBA.UnionMember[] arr){

        if (arr == null || arr.length == 0)
            return new org.omg.CORBA.UnionMember[0];
        org.omg.CORBA.UnionMember[] result =
                new org.omg.CORBA.UnionMember[arr.length];

        System.arraycopy(arr, 0, result, 0, arr.length);
        return result;
    }
}
